package org.example.exception;

import lombok.Getter;

@Getter
public class BusinessException extends RuntimeException{
    private final int code;
    public BusinessException(String msg){
        super(msg);
        this.code = 500;
    }

    // 构造方法（错误码+消息）
    public BusinessException(int code, String message) {
        super(message);
        this.code = code;
    }

}
